/*
* Requires: jquery, swiperjs, gsap, scroll-trigger, split-text
*/
jQuery(document).ready( ($) => {
var timelineTest = gsap.timeline();
// Append gradient elipse @ intro video section
$('section.section--intro .row--video-intro').append(`
`)
$('section.section--intro .row--video-intro').append(``)
let videoPlayer__Handler = () => {
let videoBtn = $('body section.section--about-us .video-wrapper .play--btn');
$(videoBtn).click( () => {
$('').appendTo('body')
$('').appendTo('.video-holder')
$('').prependTo('.video-holder')
$('body .main-page-wrapper, body header, body .whb-clone').css({ 'opacity': '.2', 'pointer-events': 'none', 'filter': 'blur(5px)' })
$('body .close-icon').one( 'click', () => {
$('body .video-holder').remove()
$('body .main-page-wrapper, body header, body .whb-clone').css({ 'opacity': '1', 'pointer-events': 'all', 'filter': 'none' })
})
})
}
let infoblocks__tabsHandler = () => {
$(`.section--infoblocks .ul-pills > li`).click( (e) => {
let tabID = 1
let btnSrc = ''
let tabsElement = `.section--infoblocks .wd-tabs ul.wd-nav > li`
let tabToEnable = $(e.currentTarget).attr(`data-enable`)
$(`.section--infoblocks .ul-pills > li`).removeClass('active')
$(e.currentTarget).addClass('active')
switch (tabToEnable) {
case `pathologiko`: {
tabID = 0
btnSrc = '/departments/#pathologiko'
break
}
case `xeirourgiko`: {
tabID = 1
btnSrc = '/departments/#xeirourgiko'
break
}
case `diagnostika`: {
tabID = 2
btnSrc = '/departments/#diagnostika-ergasthria'
break
}
case `endoskopiseon`: {
tabID = 3
btnSrc = '/departments/#ekswterika-iatreia'
break
}
default: {
tabID = 4
break
}
}
$(tabsElement).eq(tabID).click()
$('body section.section--infoblocks .row1 a.cta').attr('href', btnSrc);
})
}
get__lang = () => {
return "el" == $('html').attr("lang") ? "gre" : "eng"
}
infoblocks__tabsHandler()
// Video popup handler
videoPlayer__Handler()
// Intro ΕΟΠΥΥ info tooltip
tippy('.section--intro .eopyy--introblock', { theme: 'anassa', arrow: true, delay: [null, 125], placement: 'top-start' });
// Create intro blocks elements
$('.intro-blocks--wrapper > .swiper-slide').each( (i, e) => $(e).addClass(`slide--${i+1}`).html(`${ $(e).attr('data-header') }
${ $(e).attr('data-call-to-action') }`) );
// $(window).width() <= 1460 && $('.intro-blocks--wrapper > .swiper-slide').each( (i, e) => $(e).find('a').html(`Περισσότερα`) );
// Intro blocks slider init
waitForElm('.intro-blocks--wrapper > .swiper-slide').then( (e) => {
setTimeout(() => {
const swiper = new Swiper(".intro-blocks", { slidesPerView: 'auto', spaceBetween: 0, centeredSlides: false, autoplay: { delay: 975 }, initialSlide: 1, speed: 975, loop: false });
}, 10)
})
// Wait for blog posts to load
waitForElm('.section--latest-news .owl-carousel.owl-loaded').then( (e) => {
// Append 'read more' and date elements
$('.section--latest-news .owl-stage article').each( (index, element) => {
$(element).find('.post-title').after(``);
})
// Navigation handler
$('.section--latest-news .posts--nav-wrapper .posts--nav-prev').click( () => $('.section--latest-news .owl-nav>div[class*="prev"]').click() )
$('.section--latest-news .posts--nav-wrapper .posts--nav-next').click( () => $('.section--latest-news .owl-nav>div[class*="next"]').click() )
})
// Intro home section
gsap.from('.section--intro .nk-awb .nk-awb-wrap', { y: -20, opacity: 0 });
gsap.from('.section--intro .row--video-intro .main-text h2', { opacity: 0 }, 'mid', .275, 'splitText');
gsap.from('.section--intro .bg-asset--Elipse', { y: -25, scale: .095, opacity: 0 }, '2.255', .375);
gsap.from('.section--intro .bg-asset--LogoPattern', { y: -25, scale: .095, opacity: 0, rotate: 15 }, '2.975', .475);
gsap.from('.section--intro .eopyy--introblock', { y: -15, opacity: 0 }, 'mid', 1.575);
gsap.from('.section--intro .row--intro-blocks', { y: -15, opacity: 0 }, 'mid', 1.675);
gsap.from('.section--infoblocks .main-text label.l-lg', { opacity: 0 }, 'mid', .075, 'splitText');
gsap.from('.section--infoblocks .main-text h1', { opacity: 0 }, 'mid', .275, 'splitText');
gsap.from('.section--infoblocks a.cta', { y: -15, opacity: 0 }, 'mid', .675);
gsap.from('.section--infoblocks .wd-tabs.wd-wpb ', { y: -20, opacity: 0 }, 'mid', .475);
gsap.from('.section--infoblocks .ul-pills li:nth-child(1)', { opacity: 0 }, 'fast',1.699);
gsap.from('.section--infoblocks .ul-pills li:nth-child(2)', { opacity: 0 }, 'fast',1.775);
gsap.from('.section--infoblocks .ul-pills li:nth-child(3)', { opacity: 0 }, 'fast',1.875);
gsap.from('.section--infoblocks .ul-pills li:nth-child(4)', { opacity: 0 }, 'fast',1.975);
gsap.from('.section--infoblocks .ul-pills li:nth-child(5)', { opacity: 0 }, 'fast',2.175);
gsap.from('.section--about-us .main-text label', { opacity: 0 }, 'mid', .075, 'splitText');
gsap.from('.section--about-us .main-text h2', { opacity: 0 }, 'mid', .275, 'splitText');
gsap.from('.section--about-us .main-text .sub-paragraph', { y: -15, opacity: 0 }, 'mid', .475);
gsap.from('.section--about-us .main-text a.cta', { y: -15, opacity: 0 }, 'mid', .675);
gsap.from('.section--about-us .video-wrapper', { y: -15, opacity: 0 }, 'mid', .675);
gsap.from('.section--about-us .vc_col-sm-8 .main-text .p-sm:nth-child(1)', { y: -15, opacity: 0 }, 'mid', .875);
/* gsap.from('.section--about-us .vc_col-sm-8 .main-text .p-sm:nth-child(2)', { y: -15, opacity: 0 }, 'mid', .975);*/
gsap.from('.section--about-us .vc_separator .vc_sep_holder .vc_sep_line', { width: 0, opacity: 0 },1.575, .975);
gsap.from('.section--our-values .wpb_wrapper > .vc_row:nth-child(1) label', { opacity: 0 }, 'mid', .075, 'splitText');
gsap.from('.section--our-values .wpb_wrapper > .vc_row:nth-child(1) .vc_sep_line', { width: 0, opacity: 0 }, 1.575, .275);
gsap.from('.section--our-values .main-text h3', { opacity: 0 }, 'fast', .475, 'splitText');
gsap.from('.section--our-values .wpb_wrapper > .vc_row:nth-child(3) .vc_sep_line', { width: 0, opacity: 0 }, 1.575, .675);
gsap.from('.section--our-values .vc_row .vc_col-sm-4 p.p-md', { opacity: 0 }, 'mid',1.475);
gsap.from('.section--our-values .vc_row .vc_col-sm-3 p.p-md', { opacity: 0 }, 'mid',1.875);
/*gsap.from('.section--our-values .vc_row > .vc_col-sm-5 label.l-md', { opacity: 0 }, 'mid',1.975, 'splitText');
gsap.from('.section--our-values .vc_row > .vc_col-sm-7 label.l-md', { opacity: 0 }, 'mid',2.175, 'splitText');*/
/* gsap.from('.section--our-values .main-text .number--tmimata', { y: -15, opacity: 0 }, 'mid', 1.875);
gsap.from('.section--our-values .main-text .number--prosopiko', { y: -15, opacity: 0 }, 'mid', 2.275);
gsap__animateNumbers('.section--our-values .main-text .number--tmimata', { start: 0, end: 46 }, 3.975, 1.875);
gsap__animateNumbers('.section--our-values .main-text .number--prosopiko', { start: 0, end: 100 }, 3.975, 2.275);*/
gsap.from('.section--latest-news .main-text h1', { opacity: 0 }, 'fast', .075, 'splitText');
gsap.from('.section--latest-news .posts--nav-wrapper', { x: -20, opacity: 0 }, 'mid', .275);
gsap.from('.section--latest-news .wd-carousel-container', { y: -20, opacity: 0 }, 'mid', .275);
gsap.from('.section--latest-news .main-cta a.cta', { opacity: 0 }, 'mid', .275);
gsap.from('.section--latest-news .main-text p.p-sm', { opacity: 0 }, 'mid', .275);
/***** ESPA BANNER *****/
var espaHolder = $('');
$(espaHolder).appendTo('body');
var espaBanner = $('
');
$(espaBanner).appendTo(espaHolder);
var closeIcon = $('');
$(closeIcon).appendTo(espaHolder);
$(closeIcon).click(function(){
$(espaHolder).fadeOut(300);
});
if ( document.documentElement.lang.toLowerCase() === "en-us" ) {
$(espaBanner).attr("src","/wp-content/uploads/2025/09/antagonistikotitaframeEN-1-1.jpg");
}
if ( document.documentElement.lang.toLowerCase() === "de-de" ) {
$(espaBanner).attr("src","/wp-content/uploads/2025/09/antagonistikotitaframeEN-1-1.jpg");
}
$(espaBanner).click(function() {
const lang = document.documentElement.lang.toLowerCase();
if (lang === "en-us" || lang === "de-de") {
// English or German link
var url = 'https://anassageneral.gr/wp-content/uploads/2025/09/The-business-was-funded-by-the-Competitiveness-Program.pdf';
window.open(url);
} else {
// Greek link (default)
var url = 'https://anassageneral.gr/wp-content/uploads/2025/09/ΠληροφορίεςΕργουΑιχμης.pdf';
window.open(url);
}
});
})